3.1.8 \(\int \cot ^8(a+b x) \, dx\) [8]

Optimal. Leaf size=57 \[ x+\frac {\cot (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^7(a+b x)}{7 b} \]

[Out]

x+cot(b*x+a)/b-1/3*cot(b*x+a)^3/b+1/5*cot(b*x+a)^5/b-1/7*cot(b*x+a)^7/b

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 2, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3554, 8} \begin {gather*} -\frac {\cot ^7(a+b x)}{7 b}+\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\cot (a+b x)}{b}+x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[a + b*x]^8,x]

[Out]

x + Cot[a + b*x]/b - Cot[a + b*x]^3/(3*b) + Cot[a + b*x]^5/(5*b) - Cot[a + b*x]^7/(7*b)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int \cot ^8(a+b x) \, dx &=-\frac {\cot ^7(a+b x)}{7 b}-\int \cot ^6(a+b x) \, dx\\ &=\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^7(a+b x)}{7 b}+\int \cot ^4(a+b x) \, dx\\ &=-\frac {\cot ^3(a+b x)}{3 b}+\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^7(a+b x)}{7 b}-\int \cot ^2(a+b x) \, dx\\ &=\frac {\cot (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^7(a+b x)}{7 b}+\int 1 \, dx\\ &=x+\frac {\cot (a+b x)}{b}-\frac {\cot ^3(a+b x)}{3 b}+\frac {\cot ^5(a+b x)}{5 b}-\frac {\cot ^7(a+b x)}{7 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
time = 0.01, size = 33, normalized size = 0.58 \begin {gather*} -\frac {\cot ^7(a+b x) \, _2F_1\left (-\frac {7}{2},1;-\frac {5}{2};-\tan ^2(a+b x)\right )}{7 b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + b*x]^8,x]

[Out]

-1/7*(Cot[a + b*x]^7*Hypergeometric2F1[-7/2, 1, -5/2, -Tan[a + b*x]^2])/b

________________________________________________________________________________________

Maple [A]
time = 0.07, size = 52, normalized size = 0.91

method result size
derivativedivides \(\frac {-\frac {\left (\cot ^{7}\left (b x +a \right )\right )}{7}+\frac {\left (\cot ^{5}\left (b x +a \right )\right )}{5}-\frac {\left (\cot ^{3}\left (b x +a \right )\right )}{3}+\cot \left (b x +a \right )-\frac {\pi }{2}+\mathrm {arccot}\left (\cot \left (b x +a \right )\right )}{b}\) \(52\)
default \(\frac {-\frac {\left (\cot ^{7}\left (b x +a \right )\right )}{7}+\frac {\left (\cot ^{5}\left (b x +a \right )\right )}{5}-\frac {\left (\cot ^{3}\left (b x +a \right )\right )}{3}+\cot \left (b x +a \right )-\frac {\pi }{2}+\mathrm {arccot}\left (\cot \left (b x +a \right )\right )}{b}\) \(52\)
norman \(\frac {\frac {\tan ^{6}\left (b x +a \right )}{b}+x \left (\tan ^{7}\left (b x +a \right )\right )-\frac {1}{7 b}+\frac {\tan ^{2}\left (b x +a \right )}{5 b}-\frac {\tan ^{4}\left (b x +a \right )}{3 b}}{\tan \left (b x +a \right )^{7}}\) \(64\)
risch \(x +\frac {8 i \left (105 \,{\mathrm e}^{12 i \left (b x +a \right )}-315 \,{\mathrm e}^{10 i \left (b x +a \right )}+770 \,{\mathrm e}^{8 i \left (b x +a \right )}-770 \,{\mathrm e}^{6 i \left (b x +a \right )}+609 \,{\mathrm e}^{4 i \left (b x +a \right )}-203 \,{\mathrm e}^{2 i \left (b x +a \right )}+44\right )}{105 b \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{7}}\) \(90\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(b*x+a)^8,x,method=_RETURNVERBOSE)

[Out]

1/b*(-1/7*cot(b*x+a)^7+1/5*cot(b*x+a)^5-1/3*cot(b*x+a)^3+cot(b*x+a)-1/2*Pi+arccot(cot(b*x+a)))

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 54, normalized size = 0.95 \begin {gather*} \frac {105 \, b x + 105 \, a + \frac {105 \, \tan \left (b x + a\right )^{6} - 35 \, \tan \left (b x + a\right )^{4} + 21 \, \tan \left (b x + a\right )^{2} - 15}{\tan \left (b x + a\right )^{7}}}{105 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^8,x, algorithm="maxima")

[Out]

1/105*(105*b*x + 105*a + (105*tan(b*x + a)^6 - 35*tan(b*x + a)^4 + 21*tan(b*x + a)^2 - 15)/tan(b*x + a)^7)/b

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (51) = 102\).
time = 2.61, size = 168, normalized size = 2.95 \begin {gather*} \frac {176 \, \cos \left (2 \, b x + 2 \, a\right )^{4} - 108 \, \cos \left (2 \, b x + 2 \, a\right )^{3} + 20 \, \cos \left (2 \, b x + 2 \, a\right )^{2} + 105 \, {\left (b x \cos \left (2 \, b x + 2 \, a\right )^{3} - 3 \, b x \cos \left (2 \, b x + 2 \, a\right )^{2} + 3 \, b x \cos \left (2 \, b x + 2 \, a\right ) - b x\right )} \sin \left (2 \, b x + 2 \, a\right ) + 228 \, \cos \left (2 \, b x + 2 \, a\right ) - 76}{105 \, {\left (b \cos \left (2 \, b x + 2 \, a\right )^{3} - 3 \, b \cos \left (2 \, b x + 2 \, a\right )^{2} + 3 \, b \cos \left (2 \, b x + 2 \, a\right ) - b\right )} \sin \left (2 \, b x + 2 \, a\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^8,x, algorithm="fricas")

[Out]

1/105*(176*cos(2*b*x + 2*a)^4 - 108*cos(2*b*x + 2*a)^3 + 20*cos(2*b*x + 2*a)^2 + 105*(b*x*cos(2*b*x + 2*a)^3 -
 3*b*x*cos(2*b*x + 2*a)^2 + 3*b*x*cos(2*b*x + 2*a) - b*x)*sin(2*b*x + 2*a) + 228*cos(2*b*x + 2*a) - 76)/((b*co
s(2*b*x + 2*a)^3 - 3*b*cos(2*b*x + 2*a)^2 + 3*b*cos(2*b*x + 2*a) - b)*sin(2*b*x + 2*a))

________________________________________________________________________________________

Sympy [A]
time = 0.16, size = 51, normalized size = 0.89 \begin {gather*} \begin {cases} x - \frac {\cot ^{7}{\left (a + b x \right )}}{7 b} + \frac {\cot ^{5}{\left (a + b x \right )}}{5 b} - \frac {\cot ^{3}{\left (a + b x \right )}}{3 b} + \frac {\cot {\left (a + b x \right )}}{b} & \text {for}\: b \neq 0 \\x \cot ^{8}{\left (a \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)**8,x)

[Out]

Piecewise((x - cot(a + b*x)**7/(7*b) + cot(a + b*x)**5/(5*b) - cot(a + b*x)**3/(3*b) + cot(a + b*x)/b, Ne(b, 0
)), (x*cot(a)**8, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (51) = 102\).
time = 0.47, size = 116, normalized size = 2.04 \begin {gather*} \frac {15 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{7} - 189 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{5} + 1295 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{3} + 13440 \, b x + 13440 \, a + \frac {9765 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{6} - 1295 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{4} + 189 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{2} - 15}{\tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )^{7}} - 9765 \, \tan \left (\frac {1}{2} \, b x + \frac {1}{2} \, a\right )}{13440 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(b*x+a)^8,x, algorithm="giac")

[Out]

1/13440*(15*tan(1/2*b*x + 1/2*a)^7 - 189*tan(1/2*b*x + 1/2*a)^5 + 1295*tan(1/2*b*x + 1/2*a)^3 + 13440*b*x + 13
440*a + (9765*tan(1/2*b*x + 1/2*a)^6 - 1295*tan(1/2*b*x + 1/2*a)^4 + 189*tan(1/2*b*x + 1/2*a)^2 - 15)/tan(1/2*
b*x + 1/2*a)^7 - 9765*tan(1/2*b*x + 1/2*a))/b

________________________________________________________________________________________

Mupad [B]
time = 0.11, size = 43, normalized size = 0.75 \begin {gather*} x+\frac {-\frac {{\mathrm {cot}\left (a+b\,x\right )}^7}{7}+\frac {{\mathrm {cot}\left (a+b\,x\right )}^5}{5}-\frac {{\mathrm {cot}\left (a+b\,x\right )}^3}{3}+\mathrm {cot}\left (a+b\,x\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a + b*x)^8,x)

[Out]

x + (cot(a + b*x) - cot(a + b*x)^3/3 + cot(a + b*x)^5/5 - cot(a + b*x)^7/7)/b

________________________________________________________________________________________